class CreateDevices < ActiveRecord::Migration
  def change
    create_table :devices do |t|
      t.integer :account_id, :null => false
      t.string :name 
      t.string :company
      t.string :industry
      t.string :province
      t.string :city
      t.string :district
      t.string :longitude
      t.string :latitude
      t.string :cantact
      t.string :phone
      t.datetime :online_date

      t.timestamps
    end

    add_index :devices, :account_id
  end
end
